#pragma once
#include "afxwin.h"

#include <vector>


// LightSourcesDlg dialog

struct light_t {
	int r,g,b;
	int x,y,z;
	bool parallel, point;
	bool enabled;
	light_t() :r(255), g(255), b(255), x(0), y(0), z(1), parallel(true), point(false), enabled(false) {};
};

class LightSourcesDlg : public CDialog
{

	DECLARE_DYNAMIC(LightSourcesDlg)

public:
	const static int num_of_lights = 10;
	static std::vector<light_t> m_lights;

	LightSourcesDlg(CWnd* pParent = NULL);   // standard constructor
	virtual ~LightSourcesDlg();

// Dialog Data
	enum { IDD = IDD_LIGHT_SRCS };

protected:
	light_t m_lights_edited[num_of_lights];
	static bool lights_init;

	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	void ShowData ();
	void ReadData ();

	DECLARE_MESSAGE_MAP()
public:
	int m_ambient_r;
	int m_ambient_g;
	int m_ambient_b;
	CListBox m_c_lightlist;
	bool m_light_parallel;
	bool m_light_point;
	int m_light_r;
	int m_light_g;
	int m_light_b;
	int m_light_x;
	int m_light_y;
	int m_light_z;
	BOOL m_light_enable;
	afx_msg void OnBnClickedOk();
	virtual BOOL OnInitDialog();
	afx_msg void OnLbnSelchangeLightList();
	BOOL m_is_parallel;
	afx_msg void OnBnClickedParallelLight();
	afx_msg void OnBnClickedPointLight();
	afx_msg void OnEnChangeLightR();
	afx_msg void OnEnChangeLightG();
	afx_msg void OnEnChangeLightB();
	afx_msg void OnEnChangeLightX();
	afx_msg void OnEnChangeLightY();
	afx_msg void OnEnChangeLightZ();
	afx_msg void OnBnClickedLightEnable();
};
